<template>

  <section>
    <div class="bread">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/activePublic' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item :to="{ path: '/taskManager' }">任务管理</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-row>
      <form action="" style="padding: 10px">
        <!--<input type="text" placeholder="任务名" name="form.jobName"/>-->
        <section>
          <el-row :gutter="10">
            <!--<el-col :span="18"><div style="min-height: 36px;"> </div></el-col>-->
            <el-col :span="4">
              <el-input v-model="form.jobName" placeholder="任务名" clearable size="mini"></el-input>
            </el-col>
            <el-col :span="1" >
              <el-button type="primary" plain size="mini">查询</el-button>
            </el-col>
          </el-row>
        </section>


      </form>
    </el-row>
    <el-table
      :data="tableData"
      style="width: 100%;border : 1px solid #e4e7ed" :stripe=true :fit="true">
      <el-table-column
        type="index"
      />
      <el-table-column
        prop="jobName"
        label="任务名称">
      </el-table-column>
      <el-table-column
        prop="beanName"
        label="执行bean">
      </el-table-column>
      <el-table-column
        prop="method"
        label="执行方法">
      </el-table-column>
      <el-table-column
        prop="cronExp"
        label="cron表达式">
      </el-table-column>
      <el-table-column
        prop="status"
        label="状态" width="80">
      </el-table-column>
      <el-table-column
        prop="times"
        label="次数" width="50">
      </el-table-column>
      <el-table-column
        prop="createTime"
        label="创建时间"
       >
      </el-table-column>
      <el-table-column
        prop="updateTime"
        label="更新时间"
        >
      </el-table-column>
    </el-table>
  </section>


</template>


<script>
  export default {
    data(){
      return{
        tableData:[],
        form: {
          jobName:"",
          status:1
        }
      };
    },
    created (){
      let vm = this;
      this.$http.get('/api/job').then(function (response) {
        response = response.data;
        if (response.code === "200") {
          vm.tableData = response.result;
        }
      });
    },
    methods:{
      onSubmit(){
        console.log("submit")
      }
    }
  }
</script>
